Implanted apparatus having micro processor controlled current and voltage sources with reduced voltage levels when not providing stimulation

ABSTRACT

An implant for stimulating the vagus nerve receives commands over a radio frequency link. The implant disables a voltage convertor used in providing the stimulation signal at periodic intervals to monitor for communications attempts. The implant provides radio frequency marker pulses before providing stimulation signals of certain frequencies. During the providing of stimulation signals the implant monitors the voltage overhead present between the voltage source and the load and adjusts the overhead to a desired level. The implant changes the voltage applied to certain internal components during stimulation periods to allow full power operation during those intervals and reduced power levels at other intervals. The implant is reset by the placing of a magnet in a given location in conjunction with the application of a radio frequency transmission for a given period.

This is a divisional of application Ser. No. 434,985, filed Nov. 13,1989.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to implantable medical stimulators, and moreparticularly to stimulators which produce an electrical stimulationsignal.

2. Description of the Related Art

Epilepsy and other similar motor disorders are associated with abnormalneural discharge patterns. Several different treatment techniques andmethods involving applying an electrical signal to stop or reduceseizures were described in U.S. Pat. No. 4,702,254 to Dr. Jacob Zabara,which patent is hereby incorporated by reference in this specification.One technique involved determining when an epileptic seizure was aboutto occur, and applying an electrical signal to the vagus nerve. Theother technique suggested periodically applying a signal to the vagusnerve even if an aura or other condition was not sensed. Possibletreatment periods were suggested. The patent further disclosed a highlevel block diagram of a circuit for applying electrical signals to thevagus nerve. The signals could be varied between stated limits. Thelimits were stated as being programmable by use of a reed switch whoseopenings and closings are controlled by an external programmer andelectromagnet.

Conventional implantable medical stimulators such as pacemakers and druginfusion pumps are ordinarily based on custom integrated circuits whichare quite complex, and therefore expensive, and use complicated pulseposition communications techniques to transfer information between theimplant and an external programmer. The custom circuitry is developedbecause of the need to keep power consumption at a minimum, theallowable size for implantable devices and the complexity of thecommunications techniques. The expense of the implanted unit and theprogrammer thus limits both the number of persons who can obtain theunits and the number of hospitals, clinics and doctors which can programthe units. Therefore it is undesirable to simply port over pacemakertechnology for use in epileptic and other nervous system disorderpatients.

SUMMARY OF THE INVENTION

The present invention relates to a more cost effective, implantablestimulator particularly tailored for use in stimulating the vagus nerveto reduce epileptic seizures. A conventional microprocessor is used inconjunction with other standardly available components to form thestimulator. No custom integrated circuitry is utilized.

The communications circuitry is simplified to reduce the space utilized.The coil and voltage converter used to produce the current supplied tothe patient is also used to produce the transmitted signal. The receivedsignal from the programmer can be received by an optimized receiver coilor can be received by the transmitter coil to further save space. Toallow the receiver to function without requiring circuitry to cancel orfilter any signals produced by the system while supplying current to thepatient, which produces a very high interference level environment, thecurrent drive is periodically removed to allow the receiver a cleaninterval for reception of signals from the programmer. Additionally,during certain treatment periods a marker pulse is transmitted to allowexternal diagnostic instruments to be synchronized to the implantedcircuit. To further improve the radio frequency interface the programmeruses an X-shaped coil pair to allow better coupling between theimplanted unit and the programmer.

The output driver used to provide the current to the electrodes coupledto the vagus nerve is programmable for both the current supplied and thevoltage applied. An overhead voltage, the difference between the loadvoltage at the desired current level and the available voltage sourcelevel, is raised if the overhead voltage is below a given level.Therefore power consumption is minimized and abrupt voltage changes arereduced.

To further reduce energy consumption the microprocessor controls its ownoperating voltage and that of other devices so that the microprocessorand the devices use less power during certain intervals and themicroprocessor and the devices are activated during more criticaloperations. Particularly, the voltage provided to the output driver islowered and the current drive disabled when stimulation is not beingprovided. When the patient is being stimulated, the voltage to theoutput driver is increased and the current drive is enabled.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description of the preferred embodiment is consideredin conjunction with the following drawings, in which:

FIG. 1 is a schematic diagram of an implantable stimulator according tothe present invention;

FIG. 2 is a schematic and block diagram of a programming system for usewith the implantable stimulator of FIG. 1; and

FIGS. 3A, 3B, 3C, 3D, 4A and 4B are flowchart illustrations of operatingsequences of the implant of FIG. 1.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to FIG. 1 the letter I generally represents electroniccomponentry installed in the implantable portion of a stimulatoraccording to the present invention. The external portion or programmingsystem (FIG. 2) is generally referred to as the letter P and is used tocommunicate with the implant I.

The main component of the implant I is a processor 20, preferably a CMOSmicrocomputer such as the 68C05 available from Motorola SemiconductorProducts, Inc. The CMOS version is preferable because this reduces thepower consumed by the implant I. The processor 20 includes a series ofparallel input and output lines, an asynchronuous serial port and atimer which can generate interrupts. A battery 22 having a batteryvoltage V_(B), preferably 3.6 volts, is connected to a programmablepositive voltage regulator 24. Regulated voltage outputs from theregulator 24 provide the microprocessor 20 and other components in thesystem with a voltage referred to as the microprocessor voltage V_(up).A resister 26 is connected between the voltage output of the regulator24 and the voltage set input, with a resistor 28 connected between thevoltage set input and ground. This is the basic feedback circuitutilized by the regulator 24 to regulate its output voltage. A controlresistor 30 is connected between the voltage set input of the regulator24 and a digital output of the processor 20 to allow the processor 20 tocontrol its own supply voltage V_(up). In this manner the supply voltageV_(up) reduced from 2.8 volts to 1.4 volts during certain operatingportions as will be explained to slow down operation of the processor 20and thereby reduce power consumption. The voltage V_(up) is increasedduring other operations of the processor 20 when higher speed operationis appropriate. A crystal 32, capacitor 34 and resistors 36 and 38 areconnected to the processor 20 according to instructions from themanufacture to produce the clocking signal for the processor 20. In thepreferred embodiment the operating frequency is 76.8 kHz, but othervalues can be utilized if desired.

An up converter 39 based on a CMOS step up switching regulator 40, suchas an MAX630 manufactured by Maxim Integrated Product, is used todevelop the voltages necessary to drive the electrodes (not shown)connected to the vagus nerve according to U.S. Pat. No. 4,702,254 and todrive the transmitter portions of the implant I. The switching regulator40 is connected to the battery voltage V_(B) by means of atransmit/converter coil 42. This transmit/converter coil 42 serves thedual purpose of performing the inductance function in the up converter39 and serving as the transmitter antenna for the radio frequencytransmission portions of the implant I. The transmit/converter coil 42is connected between the battery voltage V_(B) and the inductance inputof the regulator 40. The anode of a diode 44 is connected to theinductance input of the regulator 40, while the cathode of the diode 44is connected to the supply voltage input of the regulator 40 and to oneside of a capacitor 46. The other side of the capacitor 46 is connectedto ground. A resistor 48 is connected between the supply voltage inputof the regulator 40 and the feedback or voltage sense input. A resistor50 has one terminal connected to the feedback voltage input of theregulator 40 and has its other terminal connected to the serial outputof the processor 20. The resistor 50 is used to set the feedback voltageto the regulator 40 at either high or low levels as necessary to causethe regulator 40 to produce a large signal during a low phase so that alarge RF field is emitted from the coil 42 and no signal during a highphase so no RF field is emitted from the coil 42. This emitted RF fieldis then the transmitted signal from the implant I during communicationor marker phases.

Additionally, three resistors 52, 54 and 56 have one terminal connectedto the voltage feedback input of the regulator 40 and their otherterminals coupled to three outputs of the processor 20. These threeresistors 52, 54 and 56 form a resistor divider network used to programthe output voltage of the regulator 40. The regulator 40 is designedsuch that the inductance output is pulsed whenever the voltage at thefeedback terminal is less than 1.31 volts. By varying the voltageapplied by the processor 20 to the resistors 52, 54 and 56, as well asresistor 50, the effective resistance to ground from the feedbackvoltage input can be varied, changing the feedback ratio and thus theoutput voltage.

A capacitor 58 used to set the oscillator frequency of the regulator 40is connected between ground and the capacitor input on the regulator 40.In the preferred embodiment the oscillation frequency is 40 kHz. Tworesistors 60 and 62 are connected in series between the battery voltageV_(B) and ground to form a voltage divider pair. A capacitor 64 isconnected in parallel with the resistor 62, which is connected toground. The connection point between the two resistors 60 and 62 isconnected to a battery level sense input of the regulator 40, whichprovides a low signal on a low battery output if the voltage at the lowbattery input is below 1.31 volts. The low battery output signal isprovided to an input of the processor 20, this signal being pulled up tothe microprocessor voltage V_(up) by a resistor 66. Thus in this mannerthe processor 20 can determine when the battery voltage is low and setan appropriate flag for communication to the programmer P. An outputfrom the processor 20 is connected to an enable input of the regulator40, to allow the processor 20 to disable operation of the regulator 40when desired to reduce power consumption of the circuitry in the implantI. The up converter 39 can be powered down when no radio frequencytransmissions are occurring and when no drive is being supplied to theelectrode.

A programmable current source C provides the constant current which issupplied to the electrodes coupled to the vagus nerve. The current isprovided by an NPN transistor 70, whose emitter is connected to aresistor 72 whose other terminal is connected to a normally closedterminal 73 of a reed switch 74. The contact of the reed switch 74 isconnected to ground. The reed switch 74 is used for manually initiatinga treatment cycle, for disabling the drive to the electrodes andresetting the processor 20. The base of the transistor 70 is connectedto the output of an operational amplifier 76 and to one terminal of aresistor 78 whose other terminal is connected to ground. The emitter ofthe transistor 70 is also connected to the parallel combination of aresistor 80 and a capacitor 82, which form the feedback components forthe current source C. The second terminals of the capacitor 82 and theresistor 80 are connected to the inverting input of the amplifier 76.Also connected to the inverting input of the amplifier 76 are sixresistors 84, 86, 88, 90, 92 and 94 which effectively form a binaryladder between six outputs of the microprocessor 20 and the invertinginput of the amplifier 76. Thus the six resistors 84-94 perform thedigital to analog conversion used in making the current source Cprogrammable.

The non-inverting input of the amplifier 76 is connected to one terminalof a resistor 96 whose other terminal is connected to ground. Preferablythe resistor 96 is a selected value to allow precise trimming of theaccuracy of the current source C. Also connected to the non-invertinginput of the amplifier 76 is a resistor 100 whose other terminal isconnected to the cathode of a precision voltage reference drawn forillustration purposes as a Zener diode 102 whose anode is connected toground. Also connected to the cathode of the Zener diode 102 is aresistor 104 which has its other terminal connected to an output of theprocessor 20. In this way the processor 20 can define a reference drivevoltage to be used by the current source amplifier 76. A zero levelvoltage applied to the resistor 104 shuts off the current source C. Aresistor 106 is connected between the cathode of the Zener diode 102 andthe inverting input of the amplifier 76 to allow the lowest desiredcurrent setting, 0.25 mA, in the preferred embodiment, to be developed.A desired output for the current source C is established by setting anon-zero level on the inverting input of the amplifier 76 by driving theoutput connected to the resistor 104 high and then driving the sixdigital to analog resistors 84-94 as desired to set the proper level.Power to the amplifier 76 is provided by an output of the processor 20,allowing the amplifier 76 to be completely shut off during low powerconsumption periods.

The drive or stepped up voltage as developed at the cathode of the diode44, the output of the up converter 39, is provided to a resistor 110whose other terminal is connected to the implant container. In parallelwith the resistor 110 is a capacitor 112. A capacitor 114 is connectedbetween the container and a capacitor 116, whose other terminal isconnected to the negative electrode. Also connected to capacitor 114 isthe cathode of a Zener diode 118, whose anode is connected to ground tolimit the voltage that can be applied on the negative electrode. Theanode of a diode 120 is connected to the cathode of the Zener diode 118and has its anode connected to the collector of the transistor 70. AnNPN transistor 122 has its emitter connected to the cathode of the Zenerdiode 118, its base connected to the cathode of the diode 120 and itscollector connected to the positive electrode. A Zener diode 124 has itscathode connected to the positive electrode and its anode connected toground to provide overvoltage protection. A resistor 126 is connectedbetween the drive voltage and the base of the transistor 122 to bias thetransistor 122 for operation. A capacitor 128 is connected in parallelwith the resistor 126.

The sufficiency of the voltage present at the collector of thetransistor 70, which is used to drive the positive electrode, is fedback to the processor 20 for use in determining the proper outputvoltage of the regulator 40. This is done by having a resistor 132connected between the collector of the transistor 70 and the base of aPNP transistor 134. The emitter of the transistor 134 is connected tothe microprocessor voltage V_(up), while the collector is connected toan input to the processor 20 and the parallel combination of a resistor136 and a capacitor 138, whose other terminals are connected to ground.In this way if the voltage being supplied to the base of the transistor134 should go too low, so that the transistor 134 is activated, theprocessor 20 can sense this point and raise the voltage output of the upconverter 39 by appropriately decreasing the effective resistancesupplied by the resistors 52, 54 and 56. This increases the availabledrive voltage so that the programmable current source C is properlydriving the desired currents and is not in saturation or limiting.

A normally open contact 71 of the reed switch 24 is connected to aninput of the processor 20 and is pulled up to the microprocessor voltageV_(up) by a resistor 142. Also connected to this input of the processor20 are the base and emitter of an NPN transistor 144. The collector ofthe transistor 144 is connected to the low true reset input of theprocessor 20 and to a capacitor which is connected to the microprocessorvoltage V_(up). Voltage is supplied to the collector of the transistor144 by means of a resistor 148 connected between the collector of thetransistor 144 and the collector of a transistor 150. The transistor 150is the drive transistor connected to the serial input of the processor20 which is used to receive an incoming radio frequency transmission.

The collector of the transistor 150 is pulled up to the microprocessorvoltage V_(up) by a resistor 152. The emitter of the transistor 150 isconnected to ground. The base of the transistor 150 is connected to twobias resistor 154 and 156, the resistor 154 being connected to ground,and the resistor 156 being connected to the battery voltage V_(B). Alsoconnected between the base of the transistor 150 and ground is a Zenerdiode 158, which is used to protect the transistor 150 from any receivedhigh level input voltages. A capacitor 160 is connected between the baseof the transistor 150 and one terminal of a receive coil 162. The otherterminal of the receive coil 162 is connected to ground. Thus thereceive coil 162 receives a burst of radio frequency energy from theprogrammer P which is then filtered by the capacitor 160 and provided tothe transistor 150 as the received input. While in the embodiment showntwo separate inductors 42 and 162 are used for the functions oftransmission, voltage development and reception, one single coil can beused to serve all three purposes to further save on space in the implantI. The sensitivity of the receive coil 162 and the biasing of thetransistor 150 are such that when the up converter 34 is operating theradio frequency field emitted by the transmitting/converting coil 42interferes with reception by the transistor 150. However, when the upconverter 39 is disabled the receive circuitry works properly to receivethe transmissions from the programmer P.

If the transistor 150 is turned on for a sufficient period of time, dueto the presence of an received signal, and the reed switch 74 isactivated, the capacitor 146 is charged to have a potential of themicroprocessor voltage V_(up). When the radio frequency signal isremoved and the resistor 148 is connected to the microprocessor voltageV_(up) through the resistor 152, transistor 150 is deactivated, a lowlevel will momentarily appear on the reset input of the processor 20until the capacitor 146 discharges through the resistors 148 and 152,thus allowing the processor 20 to be reset only by the combination ofhaving the reed switch 74 activated and a sufficiently long burst ofradio frequency energy received. If the reed switch 74 is not activated,the reset input is kept at a high level because the transistor 144 doesnot allow the reset input to go to a low level. If the transistor 150receives a signal, the voltage difference appears across the resistor148 and the capacitor 146 remains generally discharged. If the magnet isremoved before the radio frequency signal is removed, then the capacitor146 is discharged through the base to collector diode of the transistor144, resulting in resetting of the processor 20 if the radio frequencysignal had been provided for a sufficient time. Thus the reset procedureis place the magnet to activate the reed switch 74, activate theprogrammer P to broadcast a stream of radio frequency energy for asufficient time and stop the broadcast. Alternately, the magnet can beremoved after a sufficient period of broadcasting.

The radio frequency signals transmitted by the implant I are received bya programmer P (FIG. 2), which also generates the signals received bythe implant I. A programmed computer such as a personal computer 200,which has a serial interface, has its serial output line 202 connectedto a resistor 206 whose other terminal is connected to the anode of adiode 208. The cathode of the diode 208 is connected to the cathode of asecond diode 210 whose anode is connected to ground to provide reversevoltage protection. Also connected to the cathode of the diode 208 is aresistor 212 whose other terminal is connected to the base of an NPNtransistor 214. Connected between the base and emitter of the transistor214 is a resistor 216, with the emitter being connected to ground. Thecollector of the transistor 214 is pulled to a high voltage level by aresistor 216 and is connected to a resistor 218 who has its otherterminal connected to the gate of a n-channel enhancement MOSFETtransistor 220. The transistor 214 thus serves as a level shifter andinverter between the serial output signals and the MOSFET 220. Thesource of the MOSFET 220 is connected to ground while the drain isconnected to a resistor 216 which is connected to the logic high levelvoltage. Thus the voltage appearing at the drain of the MOSFET 220 hasthe same logic state as the signal developed by the computer 200.

The signal developed at the drain of the MOSFET 220 is connected to thereset inputs of a dual multivibrator 224. The first multivibrator 224ain the dual unit 224 is connected for a stable operation, preferablywith a frequency of approximately 100 kHz to provide the basic signalwhich is coupled to the transceiving coils 226 and 228. The output ofthe first multivibrator 224a is coupled to a push/pull transistoramplifier 230 whose output is connected to the gate of an n-channelenhancement MOSFET transistor 232 whose source is connected to groundand whose drain is connected to one terminal of the parallel combinationof the coil 226 and a capacitor 234. The other terminal of the parallelcombination of the coil 226 and a capacitor 234 is connected to thebattery voltage as supplied by batteries 310 and 312 which power theprogrammer P. A capacitor 236 is connected between the battery voltageand ground.

The output of the first multivibrator 224a is connected to the triggerinput of the second multivibrator 224b of the multivibrator 224 so thatthe second multivibrator 224b inverts the output of the firstmultivibrator 224a. These operations can be performed by themultivibrators located on the ICM7556 manufactured by Intersil, Inc. Theoutput of the second multivibrator 224b is connected to a similarpush/pull transistor amplifier 238 whose output is similarly connectedto the gate of an n-channel enhancement MOSFET 240. The source of thetransistor 240 is connected to ground while the drain is connected tothe parallel combination of the coil 228 and a capacitor 242 whose otherterminals are connected to the battery voltage The two coils 226 and 228are preferably located to form an X or cross so that the signal thatthey produce is in two different planes to increase likelihood of properreception by the implant I and receipt by the coils 226 and 228 of anysignals produced by the implant I.

The drain of the MOSFET 232 is connected to a capacitively coupledamplifier circuit 244 whose output is connected to the inverting inputof a comparator 246. The amplifier circuit 244 filters out the 40 kHzcarrier frequency of the signal produced by the implant I so that thetransmitted serial data is recovered. Similarly, the drain of the MOSFET240 is connected to a similar capacitively coupled amplifier circuit 248whose output is connected to the inverting input of a comparator 250.The non-inverting inputs of the comparators 246 and 250 are connected tothe junction between resistor 252 and potentiometer 254 whose otherterminals are respectively connected to high level voltage and ground.The wiper arm of the potentiometer 254 is connected to two resistors 256and 258 which are connected, respectively, to the inverting inputs ofthe comparators 246 and 250. Thus should either coil 226 or 228 receivea sufficient signal, the signal is amplified by the appropriateamplifier 244 or 248 and applied to the comparator 246 or 250 so that alow level signal develops at the output of the appropriate comparator246 or 250. The outputs of the two comparators 246 and 250 are connectedtogether and pulled up to a logic high level by a resistor 260. Theoutput of the comparators 246 and 250 is also applied to a resistor 262,whose other terminal is connected to the base of a PNP transistor 264and to one terminal of a capacitor 266. The second terminal of thecapacitor 266 is tied to a high level voltage for noise filtering. Thesignal which is applied to the base of the transistor 264 is essentiallyan inverted form of the signal supplied by the serial output of theprocessor 20, which is applied to the resistor 50 to control the voltagelevel output of the regulator 40.

The emitter of the transistor 264 is connected to the junction point oftwo resistors 268 and 270 whose other terminals are connected to,respectively, voltage high level and ground. The collector of thetransistor 264 is connected to the non-inverting input of an operationalamplifier 272 and to a resistor 274 whose other terminal is connected toground. The inverting input of the comparator 272 is connected to thejunction point between a resistor divider pair formed by resistors 276and 278, whose other terminals are respectively connected to ground anda high level voltage to set a reference level. The output of theamplifier 272 is provided through a resistor 280 to the serial input ofthe computer 200 and through a resistor 284 to the anode of a lightemitting diode (LED) 286 whose cathode is connected to ground. Thus theamplifier 272 is the driver to produce the proper levels of the serialsignal provided to the computer 200. The LED 286 is used to indicatewhen a signal is being received from the implant I, which signal issupplied to the computer 200. Thus the computer 200 can communicate withthe implant I via its conventional serial link.

Additionally, the output of the operational amplifier 272 is provided toa level shifting inverter 288, which provides a signal to diagnosticequipment 290. The diagnostic equipment 290 can thus receive markerpulses which are produced by the implant I under certain conditions. Themarker pulses are provided to allow the diagnostic equipment 290 tosynchronize with the implant I to allow easier analysis and diagnosis ofthe implant's operation and the patient's condition.

To prevent the computer 200 from receiving a false signal when it istransmitting, the cathode of a diode 300 is connected to the collectorof the transistor 214. The anode of the diode 300 is connected to oneterminal of a capacitor 302, one terminal of a resistor 304 and the gateof a P channel enhancement MOSFET 306. The second terminals of thecapacitor 302 and resistor 304 are connected to a high voltage level, asis the source of the MOSFET 306. The drain of the MOSFET 306 isconnected to the base of the transistor 264, so that whenever themultivibrator 224 is activated, causing a radio frequency signal to betransmitted to the implant I, the transistor 264 is clamped to a highlevel voltage so that no signal is provided to the amplifier 272 andthus back to the computer 200.

Power is supplied to the programmer P by two batteries 310 and 312,which are connected in series with each other and in parallel with adiode 314. The diode is connected with the cathode connected to thepositive voltage and the anode connected to ground. The positive batteryvoltage BAT is applied to a capacitor 316, a resistor 318 and the sourceof a P channel enhancement MOSFET 320. The gate of the MOSFET 320 andthe second terminals of the capacitor 316 and the resistor 318 areconnected to one terminal of a resistor 322, whose other terminal isconnected to ground and to the collector of an NPN transistor 324. Theconnection to ground is used only when the programmer P is connected tothe computer 200, thereby enabling the MOSFET 320 to provide voltage toa voltage regulator 336 which provides the power for the remainingcomponents in the programmer P when the programmer P is connected to thecomputer 200. The emitter of the transistor 324 is connected to ground,while the base is connected to a resistor 326, whose other terminal isconnected to ground, and to a resistor 328. The second terminal of theresistor 328 is connected to one terminal of a resistor 330, whose otherterminal is connected to one terminal of a reset switch 332. The otherterminal of the reset switch 332 is connected to the battery voltageBAT. The signal present at the junction of the resistors 328 and 330 isprovided to the cathode of the diode 208. In this way if the ground isremoved from the collector of transistor 324 because the computer 200 isnot connected, the reset switch 332 can then be used to provide a signalto the transistor 324, activating the series MOSFET 320 andsimultaneously activating the multivibrator 224 to begin a continuoustransmission. If the reset switch 332 is held for a sufficient period,20-25 seconds in the preferred embodiment, the implant I resets,assuming the magnet is in location as described above. Thus the implantI can be reset when the programmer P is not available.

The drain of the series MOSFET 320 is connected to a capacitor 334connected to ground and to the input terminal of a three terminalvoltage regulator 336. The reference leg of the three terminal regulator336 is tied between two resistors 338 and 340, with the resistor 338being connected to ground and the resistor 340 being connected to theoutput of the regulator 336. The output of the regulator 336 is the highlogic level voltage used in the programmer P and has a capacitor 342connected to ground for filtering purposes. The input voltage to thethree terminal regulator 336 is also provided to a low batteryindication circuit 344 which has an LED 346 to provide a low batteryindication.

Thus the programmer P can be used with the computer 200 to providecommands to or receive messages from the implant I or can be useduncoupled from the computer 200 to reset the implant I when used inconjunction with the magnet used to control the reed switch 74.

The operating sequence of the implant I commences at the start sequence500 (FIG. 3A). In the first step of the start sequence 500, step 502,the processor 20 clears the memory; initializes all programmable values,such as the parameters utilized with the serial port contained in theprocessor 20; initializes the total treatment time to zero hours;initializes the total operating time at 1 hour; initializes thetreatment time per day at 24 hours; initializes default normal andmagnet mode stimulation pulse amplitudes and frequencies; sets thestimulation interval at 60 minutes and sets a zero hour delay. In step502 the processor 20 also increases the voltage supplied by theregulator 24 and programs the up converter 39 and the current source C.Finally in step 502 the processor 20 sets up the internal timer andenables its interrupt. The timer is preferably set to overflow every6.826 seconds.

Control then proceeds to step 504 to determine if a delay is necessarybefore treatment is to be started. If there was no delay before startingoperation in step 504 control proceeds to step 522 (FIG. 3B). If thereis a delay, control proceeds to step 505 where the implant I is placedin standby mode. In standby mode the up converter 39 is disabled, poweris removed from the amplifier 72 and the microprocessor voltage V_(up)is set to the low level. Control then proceeds to step 506 where adetermination is made if 6.826 seconds has elapsed by checking the timeroverflow bit. This 6.826 second period is the interval between samplingsof the serial port to determine if the programmer P is attempting tocommunicate with the implant I. If the time period has elapsed, controlproceeds to step 508 where the total operating time is updated toindicate the passage of the 6.826 second interval and the delay counteris decremented. Control then proceeds to step 510 to determine if aspace character with proper parity has been received over thecommunication interface during a 300 msec window. This is done byshutting off the up converter 39 for approximately 300 msec andmonitoring the serial port. Thus the noise generated by the up converter39 is removed periodically, allowing the receive circuitry to be greatlysimplified. If a space character with proper parity has been received,this is an indication that the programmer P is attempting to communicatewith the implant I and therefore control proceeds to step 512, a receiveparameters sequence. After the parameters have been received in step 512or if a space was not received during the listening interval, controlproceeds to step 514 to check to see if the delay period is over. Ifnot, control proceeds to step 516 to determine if programming occurredin step 512. If so, control returns to step 504 to reinitiate the loop.If no programming occurred, control proceeds to step 518 where thevarious parameters, such as pulse amplitude, pulse frequency, pulsewidth, magnet activation pulse width, stimulation burst time, simulationburst interval, treatment time of day, magnet activation amplitude, andmagnet activation stimulation burst time, are checked to see if theparameters are valid. If not, valid parameters are loaded. Control thenproceeds to step 520 where a monitor reed switch sequence is called todetermine if manual activation is desired. There are two exits from themonitor reed switch routine with the first occurring if programmingoccurred, in which case control proceeds to step 504. If programming ofthe parameters did not occur during the monitor reed switch routine 700,control proceeds from step 520 to step 506.

If the delay time was over in step 514, control proceeds to step 515,where the implant I is placed in run mode. The microprocessor voltageV_(up) is increased to the high level, the up convertor 39 is enabledand power is supplied to the amplifier 74. Control then proceeds to step522 where an internal value referred to as the stimulation counter isset to stimulation on time. In step 524 a flag is set indicating thatstimulation is on and a stimulation off flag is cleared. Controlproceeds to step 526 to determine if 6.826 seconds have elapsed and itis time to monitor for a communications attempt. If not, controlproceeds to step 528 which is a reference to the monitor reed switchsequence. If programming occurs during this operation of the monitorreed switch sequence, control proceeds from step 528 to step 504. If noprogramming occurred, control proceeds to step 530 to determine ifmagnet stimulation occurred. If not, control proceeds to step 526. Ifmagnet stimulation did occur, control proceeds to step 532 (FIG. 3C).

If the 6.826 second period has elapsed in step 526, control proceeds tostep 534 to update the total treatment time and then to step 536 to seeif the implant I is in the process of ramping the pulse amplitude. Ifso, control proceeds to step 538. If ramping is not in effect, controlproceeds from step 536 to step 540 to determine if a space character hasbeen received using the process described in step 510. If not, controlproceeds to step 538. If a space has been received control proceeds tothe receive parameter sequence in step 542. After completing the receiveparameter sequence 600, step 542 transfers control to step 543 where theimplant I is placed in run mode. Control then proceeds to step 544 todetermine if programming occurred during the receive parameter sequence.If so, control returns to step 504. If not, control proceeds to step538.

In step 538 the processor 20 determines whether the parameters asindicated above are valid and updates the total operating time toindicate the 6.826 second elapsed time. Control proceeds to step 546where the total treatment time for the day is monitored. If the totaltreatment time for the day has been exceeded, then control proceeds tostep 548 (FIG. 3D). If the treatment time has not been exceeded, controlproceeds to step 550 which decrements the stimulation counter to reducethe remaining stimulation time. Control then proceeds to step 552 todetermine if the stimulation counter is zero. If the counter is notzero, indicating that the stimulation period has not ended, controlproceeds to step 528. If the stimulation counter is equal to zero, thisindicates an end to the stimulation period and control proceeds to step554. In step 554 the stimulation on flag is cleared. Control proceeds tostep 551 where the processor 20 determines if the stimulation pulsefrequency is greater than 5 Hz. If so, control proceeds to step 553 tocause the pulse to ramp down. Control proceeds to step 555, which isalso where control proceeds if the stimulator pulse frequency is notgreater than 5 Hz. In step 555 the stimulation off flag is set. Controlthen proceeds to step 532.

In step 532 the stimulation counter value is set to that of thestimulation off time and control proceeds to step 556. In step 556 adetermination is made as to whether a 6.826 second period has elapsed.If so, control proceeds to step 558 to determine if the pulse amplitudeis ramping down. If not, control proceeds to step 559 where standby modeis entered. Control proceeds to step 560 to determine if a spacecharacter is received over the communication interface during thelistening period. If so, control proceeds to step 562, which calls thereceive parameter sequence to proceed with the communication sequence.After completing the communication sequence, control proceeds from step562 to step 563 where run mode is activated. Control proceeds to step564 where a determination is made as to whether programming did occur inthe receive parameter sequence. If so, control proceeds to step 504. Ifnot, control proceeds to step 566 which is also where control proceedsif the space character has not been received in step 560 or if the pulseamplitude was ramping as determined in step 558.

In step 566 the processor 20 checks for valid parameters and updates thetotal operating time. Control then proceeds to step 568 where the totaltreatment time per day is monitored and adjusted. If the total treatmenttime per day has been exceeded, control proceeds to step 548. If thetime has not been exceeded, control proceeds to step 570 where thestimulation counter is decremented to count down the off time. In step571, which follows step 570, the processor 20 determines if thestimulation counter equals zero. If so, control proceeds to step 504. Ifthe off time has not been completed, control proceeds to step 572 whichcalls the monitor reed switch sequence. If programming occurred duringthe operation of the monitor reed switch sequence, control proceeds tostep 504. If no programming occurred, control proceeds to step 556 toloop during the off interval. Thus, under general operating conditionsthe processor 20 will loop between the stimulation off and stimulationon time sequences.

If the treatment time per day has been exceeded in steps 546 or 568,control proceeds to step 548 (FIG. 3D) where a determination is made asto whether the treatment time per day is 24 hours per day. If so,control returns to step 504. If treatment is not enabled all 24 hours ofa day control proceeds to step 574, where the treatment time per daydelay is loaded into a counter. Control proceeds to step 575 where theprocessor 20 places the implant I in standby mode. Control proceeds tostep 576 to determine if a 6.826 second period has elapsed. If so,control proceeds to step 578 to determine if the pulse amplitude is in aramp mode. If not, control proceeds to step 579 where the implant I isplaced in standby mode. Control proceeds to step 580 to determine if aspace character is received during the listening period. If so, controlproceeds to step 582 which calls the receive parameter sequence toperform any communications. Control proceeds from step 582 to step 583where the implant I is placed in run mode. Control proceeds to step 584to determine if programming had occurred. If so, control returns to step504. If not, control proceeds to step 586, which is also where controlproceeds from step 580 if a space character was not received or fromstep 578 if the amplitude was ramping.

In step 586 a check is made to determine if the parameters are stillvalid, the total operating time is updated and the treatment time perday delay is decremented. Control then proceeds to step 588 to determineif the treatment time per day delay is over. If so, control proceeds tostep 504 and treatment commences. If not, control proceeds to step 590,which is also where control proceeds if the 6.826 second period has notelapsed in step 576. In step 590 the monitor reed switch sequence iscalled. If programming occurs during the monitor reed switch sequence,control proceeds to step 504. If no programming occurred, controlproceeds from step 590 to step 576 to complete the delay period untilthe next treatment time.

The timer interrupt 800 (FIG. 8A) is an interrupt routine which operatestransparent to or in the background of all of the proceeding sequences.The timer interrupt routine operates whenever the internal timer valuehas counted to equal the value in a compare register which is loaded bythe processor 20. During stimulation this value is set so that theinterrupts occur at the stimulation frequency. The timer interruptroutine 800 starts at step 802 where the timer is loaded with thefrequency value or time to develop the pulse spacing of the appliedpulse. In this manner the timer is actually utilized to control thepulse width of the applied treatment pulses. Control proceeds to step804 to determine if the ramp down process is occurring. If not, controlproceeds to step 806 to determine if the magnet stimulation flag is set.If not, control proceeds to step 808 to determine if the stimulation onflag is set. If the answer was yes in either of steps 806 or 808,control proceeds to step 810 (FIG. 8B) to determine if a ramp up isfinished. If the ramp up is not finished, control proceeds to step 811where a determination is made if the stimulation frequency is 5 Hz orless, which indicates the implant I is in marker mode. If so, controlproceeds to step 813 where the output current is set to the desiredmaximum. Control proceeds to step 814. If not in marker mode, controlproceeds to step 812 which increases the pulse output current amplitudeby one counter value of the D/A convertor as developed by the resistors84-94. Control then proceeds to step 814 to determine if the magnetstimulation flag is set. If not, control proceeds to step 816 and thepulse width of the particular output is set to be that of the normalpulse width. If the stimulation flag is set as determined in step 814,control proceeds to step 818 where the pulse width is set to the magnetpulse width as set in the parameters. After step 816 or step 818 controlproceeds to step 820, where the treatment pulse is transmitted. Thepulse is developed by enabling the appropriate resistors 84-94 toground, not enabling the other resistors 84-94, providing the voltagereference to the amplifier 74 and activating the up converter 39. Thepulse time is developed in a software timing loop. Control proceeds tostep 822, which is a return from the timer interrupt routine 800 to theinterrupted instruction.

If at step 810 it is determined that a ramp up is finished, controlproceeds to step 824 to determine if the magnet stimulation flag is set.If not, control proceeds to step 826 where the pulse width is set to bethe normal pulse width. If the magnet stimulation flag is set in step824, control proceeds to step 828 where the pulse width for the pulse tobe developed is set to the magnet pulse width value. Control proceedsfrom either step 826 or step 828 to step 830, where the treatment pulseis transmitted. Control proceeds to step 832 where a counter used todetermine if it is time to try and reduce the value being applied to theup convertor 39 is decremented. It is desireable to set the up convertorvoltage at the lowest possible voltage and yet have sufficient margin toinsure the desired current is actually being supplied to the patient.

Control proceeds to step 834 to determine if the up convertor countvalue is equal to zero. If the up convertor count is not equal to zero,this is an indication that it is not appropriate at this point to checkthe output amplitude value. Control then proceeds to step 822 for areturn to the interrupted sequence. If the up convertor count is equalto zero, then control proceeds to step 836 where the count value isreinitiated to ten, so that every ten cycles through the timer interruptroutine 800 the voltage value may be evaluated. Control then proceeds tostep 838, where the voltage level of the collector of the transistor 134is evaluated to determine if the output voltage amplitude is acceptable.If the amplitude is not acceptable, control proceeds from step 838 tostep 840 where the up convertor output amplitude is incremented toprovide more voltage and a flag is set indicating that the up convertoroutput value should not be decremented. Control then proceeds to step822 for a return from the timer interrupt routine 800.

If the output amplitude is acceptable in step 838, control proceeds tostep 842 where the processor 20 determines if the up convertor amplitudecan be decremented. If not, control proceeds to step 822. If the upconvertor amplitude can be decremented, control proceeds to step 844where the up convertor amplitude is actually decremented. In this mannerthe voltage supplied by the up convertor 39 is reduced if desireable toconserve energy and to limit the applied voltage. Control proceeds tostep 822.

If in step 808 it is determined that the stimulation on flag is not set,control proceeds to step 846 to determine if the treatment time per daydelay is active, that is, if stimulation should not occur for a givenperiod. If so, control proceeds to step 848, which is a return to theinterrupted sequence. If the treatment time per day delay is not active,control proceeds from step 846 to step 850 to determine if thestimulation off flag is set. If so, control proceeds to step 848. Ifnot, control proceeds to step 852, which is also where control wouldproceed if it was determined in step 804 that the implant I was rampingdown the applied signal. In step 852 the processor 20 determines whetherthe amplitude of the applied pulse is equal to zero. If it is, controlproceeds to step 848. If it is not equal to zero, control proceeds tostep 854 where the amplitude of the applied signal is decremented.Control then proceeds to step 848 for a return from the time interruptroutine 800.

Therefore the implant I is operating at full power only duringstimulation times and at other periods is operating at reduced powerlevels to conserve battery life. At all times, even during stimulationintervals, the implant I periodically reduces its radio frequencyemissions and monitors a communication channels, increasing thereliability of the receiver circuitry. When the implant I is providingstimulation at below a given frequency marker pulses are developed toallow diagnostic equipment to monitor implant I operation.

The foregoing disclosure and description of the invention areillustrative and explanatory thereof, and various changes in the size,shape, materials, components, circuitry, wiring connections andcontacts, as well as in the details of the illustrated circuitry,construction and contacts, as well as in the details of the illustratedcircuitry, construction and method of operation may be made withoutdeparting from the spirit of the invention.

I claim:
 1. An implanted apparatus for providing an electrical signal toa living organism, comprising:a battery for providing electrical energy;a power supply circuit connected to said battery and having a voltageoutput responsive to a signal to select between two voltage outputlevels; a microprocessor having its power input connected to said powersupply voltage output and having a plurality of inputs and outputs, oneof said outputs connected to provide a signal to select said powersupply voltage output level; a current source for providing theelectrical signal to the living organism, said current source beingcoupled to said outputs of said microprocessor to control the productionand level of the signal provided by said current source; a voltagesource connected to said current source and to said battery to provideoperating energy for said output signal, said voltage source beingcoupled to said microprocessor outputs to control the production andlevel of the voltage provided by said voltage source; and means fordirecting said microprocessor to set output levels to select the lowerpower supply output voltage level and to disable production of signalsby said current source and said voltage source when the electricalsignal is not being provided to the living organism and for directingsaid microprocessor to set output levels to select the higher powersupply output voltage level and to enable production of signals by saidcurrent source and said voltage source when the electrical signal isbeing provided to the living organism.